//************************************************************************
//   GasMileage.java               Java Foundations
//
//   Demonstrates the use of the Scanner class to read numeric data.
//************************************************************************
import java.util.Scanner;

public class GasMileage
{
    //--------------------------------------------------------------------
    // Calculates fuel efficiency based in values entered by the user
    //--------------------------------------------------------------------
    public static void main (String[]args)
    {
        int miles ;
        double gallons,mpy;
        Scanner scan = new Scanner (System.in);
        System.out.print ("Enter the number of miles: ");
        miles = scan.nextInt();
        System.out.print ("Enter the gallons of fuel used:");
        gallons = scan.nextDouble(); 
        mpy = miles / gallons;
        System.out.println ("Miles Per Gallon: " + mpy);
    } 
}
